package com.ltxtiyu.video.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.ltxtiyu.video.dao.ltx.TokenStoreDao;
import com.ltxtiyu.video.entity.TokenStore;
import com.ltxtiyu.video.service.app.TokenStoreService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.Map;

@Service
public class TokenStoreServiceImpl implements TokenStoreService {
    @Autowired
    TokenStoreDao tokenStoreDao;

    @Override
    public TokenStore selectByOauthToken(String oauthToken, String tokenTypeApp) {
        Map<String, Object> params = new HashMap<>();
        params.put("oauthToken",oauthToken);
        params.put("type",tokenTypeApp);
        TokenStore tokenStore = tokenStoreDao.selectByOauthToken(params);
        return tokenStore;
    }
}
